In general, a cam grinding machine has a basic shortcoming that since the shape of the cam to be machined is non-circular, the precision of the shaping of the cam by grinding is difficult to attain and also the time required to grind the cam is very long. In order to overcome this shortcoming, a method has been proposed in copending Japanese patent application No. 50-56001 filed Nov. 19, 1976, in which an output signal is generated for every rotational increment corresponding to a predetermined angle of a cam, predetermined step-like speed command values are generated in response to these output signals, and drive means for driving said cam is controlled on the basis of said step-like speed command values. More particularly, according to this control method, when a cam 1 (the workpiece to be ground) is ground by a grindstone 2, which is rotated at a constant speed in the direction shown in FIG. 1, while the circumferential speed V.sub.p at the contact point P between the cam 1 and the grindstone 2 changes as a function of the rotational angular position .phi. of the cam 1 as shown in FIG. 2, if step-like speed command values V.sub.I1 -V.sub.I4 that correspond to the peripheral speeds V.sub.p but opposite in sense to the speed V.sub.p are preset as shown in FIG. 3, then by controlling the drive means for the rotary body on the basis of these speed command values, the rotational speed V.sub.R of the cam is changed as shown in FIG. 4. As a result, the circumferential speed V.sub.p at the contact point P between the cam 1 and the grindstone 2 becomes substantially constant as shown in FIG. 5, and the grinding of the cam 1 can be achieved in a short period of time and also with a high precision.
However, at the transition points A', B', C' and D' of the speed command values as illustrated in FIG. 4., as shown on an enlarged scale for the points A' and B', for example in FIG. 6, the rotational speed of the cam 1 changes abruptly, resulting in an impact force being exerted on the cam 1, and due to this impact force, an abnormal force is exerted upon the cam 1 or the power transmission system, so that the precision with which the cam 1 is ground is reduced and the life of the power transmission system may be shortened.